import Mock from 'mockjs'

Mock.mock(`${window.$mockApi}/Admin/Create`, "post", () => {
    let back = {}
    back = {
        "result":{
            "roleNames":["44e34a72c4424434aa4c771ec91d3168", "eb6f81540cd54837a9eed67eefa79f32", "ccc95bb3cc7d4a74805fbe2594caa750"],
            "userName":"admin","name":"admin","surname":"admin","emailAddress":"admin@aspnetboilerplate.com",
            "lastLoginTime":null,"creationTime":"2019-07-02 16:20:35","isActive":true,"id":1
        },
        "targetUrl":null,
        "success":true,
        "error":null
    }
    return back
})

Mock.mock(`${window.$mockApi}/Admin/Get`, "post", () => {
    let back = {}
    back = {
        "result":{
            "roleNames":["44e34a72c4424434aa4c771ec91d3168", "eb6f81540cd54837a9eed67eefa79f32", "ccc95bb3cc7d4a74805fbe2594caa750"],
            "userName":"admin","name":"admin","surname":"admin","emailAddress":"admin@aspnetboilerplate.com",
            "lastLoginTime":null,"creationTime":"2019-07-02 16:20:35","isActive":true,"id":1
        },
        "targetUrl":null,
        "success":true,
        "error":null
    }
    return back
})

Mock.mock(`${window.$mockApi}/Admin/GetRoles`, "post", () => {
    let back = {}
    back = {
        "result":{
            "items":[
                {"name":"54e34a72c8824434aa4c771ec91d9872","displayName":"恐龙大冒险","description":null,"isStatic":false,"isDefault":true,"grantedPermissions":[],"id":1},
                {"name":"44e34a72c4424434aa4c771ec91d3168","displayName":"蓝精灵","description":null,"isStatic":false,"isDefault":true,"grantedPermissions":[],"id":6},
                {"name":"eb6f81540cd54837a9eed67eefa79f32","displayName":"系统管理员","description":"","isStatic":true,"isDefault":true,"grantedPermissions":[],"id":2},
                {"name":"2a65d4030a0e4a059e797a3e20e7c3df","displayName":"加菲猫","description":"","isStatic":false,"isDefault":false,"grantedPermissions":[],"id":3},
                {"name":"ccc95bb3cc7d4a74805fbe2594caa750","displayName":"亨特尔故事","description":"","isStatic":false,"isDefault":false,"grantedPermissions":[],"id":5}
            ]
        },
        "targetUrl":null,
        "success":true,
        "error":null
    }
    return back
})

Mock.mock(`${window.$mockApi}/Admin/GetPagedList`, "post", () => {
    let back = {}
    back = {
        "result":{
            "totalCount":1,
            "items":[
                {"roleNames":["44e34a72c4424434aa4c771ec91d3168", "eb6f81540cd54837a9eed67eefa79f32", "ccc95bb3cc7d4a74805fbe2594caa750"],
                "userName":"admin","name":"admin","surname":"admin","emailAddress":"admin@aspnetboilerplate.com",
                "lastLoginTime":null,"creationTime":"2019-07-02 16:20:35","isActive":true,"id":1}
            ]
        },
        "targetUrl":null,
        "success":true,
        "error":null}
    return back
})

Mock.mock(`${window.$mockApi}/Admin/Update`, "post", () => {
    let back = {}
    back = {
        "result":{
            "roleNames":["44e34a72c4424434aa4c771ec91d3168", "eb6f81540cd54837a9eed67eefa79f32", "ccc95bb3cc7d4a74805fbe2594caa750"],
            "userName":"admin","name":"admin","surname":"admin","emailAddress":"admin@aspnetboilerplate.com",
            "lastLoginTime":null,"creationTime":"2019-07-02 16:20:35","isActive":true,"id":1
        },
        "targetUrl":null,
        "success":true,
        "error":null
    }
    return back
})

Mock.mock(`${window.$mockApi}/Admin/Delete`, "post", () => {
    let back = {}
    back = {"result":null,"targetUrl":null,"success":true,"error":null}
    return back
})

Mock.mock(`${window.$mockApi}/Admin/Deletes`, "post", () => {
    let back = {}
    back = {"result":null,"targetUrl":null,"success":true,"error":null}
    return back
})

export default Mock
